1. Field of the Invention
This invention generally relates to computer systems, and in particular to time synchronization in computer systems. Even more specifically, the invention relates to methods and systems for the estimation of clock offset and skew between two clocks in a computer system.
2. Background Art
Modern computers use clocks for many purposes, including ensuring that many operations occur in the proper sequence or in synchronization. Because of this, it is important that the clocks themselves operate in close synchronization. Typically, two clocks are often not in perfect synchronization, and there are timing differences between the clocks. In addition, two clocks may not operate at the exact same frequency, so that the timing difference between the clocks changes over time. This change in the timing difference between the clocks is referred to as the clock skew.
Many computer-timing protocols require information such as the estimation of the skew and offset between two clocks. These two clocks may be, for example, a local clock and its source clock. The accuracy of these estimations is crucial for the synchronization of the protocol. For instance, a protocol may require that a calculated time of day (TOD) offset between two servers include an estimation of the accuracy of the calculation. This is referred to as the clock-offset dispersion and bounds the worst-case error for the calculation. While methods and systems to measure clock skew are known, these known procedures tend to be quite complex, unreliable in certain situations, or both.